package com.cnswhy.cloud.server.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-10
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_withdrawal_record")
@ApiModel(value = "WithdrawalRecord", description = "")
@AllArgsConstructor
public class WithdrawalRecord extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @TableField("customer_id")
    @Excel(name = "")
    private Long customerId;

    @ApiModelProperty(value = "")
    @TableField("amount")
    @Excel(name = "")
    private BigDecimal amount;

    /**
     * 1待审核2审核通过3审核拒绝
     */
    @ApiModelProperty(value = "1待审核2审核通过3审核拒绝")
    @TableField("verify_status")
    @Excel(name = "1待审核2审核通过3审核拒绝")
    private Integer verifyStatus;

    /**
     * 1提现中2提现成3提现失败
     */
    @ApiModelProperty(value = "1提现中2提现成3提现失败")
    @TableField("status")
    @Excel(name = "1提现中2提现成3提现失败")
    private Integer status;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    @Length(max = 50, message = "订单号长度不能超过50")
    @TableField(value = "order_num", condition = LIKE)
    @Excel(name = "订单号")
    private String orderNum;

    @ApiModelProperty(value = "")
    @Length(max = 50, message = "长度不能超过50")
    @TableField(value = "return_order", condition = LIKE)
    @Excel(name = "")
    private String returnOrder;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "")
    private String remark;

    /**
     * 1积分2拼购券
     */
    @ApiModelProperty(value = "1积分2拼购券")
    @TableField("type")
    @Excel(name = "1积分2拼购券")
    private Integer type;

    /**
     * 实际支付金额
     */
    @ApiModelProperty(value = "实际支付金额")
    @TableField("real_pay")
    @Excel(name = "实际支付金额")
    private BigDecimal realPay;

    @ApiModelProperty(value = "")
    @TableField("bank_id")
    @Excel(name = "")
    private Long bankId;


    @Builder
    public WithdrawalRecord(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long createUser, Long updateUser, 
                    Long customerId, BigDecimal amount, Integer verifyStatus, Integer status, String orderNum, 
                    String returnOrder, String remark, Integer type, BigDecimal realPay, Long bankId) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.updateUser = updateUser;
        this.customerId = customerId;
        this.amount = amount;
        this.verifyStatus = verifyStatus;
        this.status = status;
        this.orderNum = orderNum;
        this.returnOrder = returnOrder;
        this.remark = remark;
        this.type = type;
        this.realPay = realPay;
        this.bankId = bankId;
    }

}
